/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #ffe8e8, #f8d7ff);
    color: #5a3d5c;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* 页眉样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

h1 {
    font-size: 2.5rem;
    color: #d64d7e;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeIn 2s ease;
}

/* 主要内容区域 */
main {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    animation: slideUp 1s ease;
}

/* 心形容器 */
.heart-container {
    text-align: center;
    margin: 20px 0;
}

.heart {
    font-size: 4rem;
    color: #ff4d8d;
    display: inline-block;
    animation: heartbeat 1.5s infinite;
    cursor: pointer;
    transition: transform 0.3s;
}

.heart:hover {
    transform: scale(1.2);
}

/* 消息容器 */
.message-container {
    text-align: center;
    margin: 30px 0;
}

.message {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 15px;
    opacity: 0;
    animation: fadeIn 1s forwards;
}

.message:nth-child(1) { animation-delay: 0.5s; }
.message:nth-child(2) { animation-delay: 1.5s; }
.message:nth-child(3) { animation-delay: 2.5s; }

.confession {
    font-size: 2rem;
    font-weight: bold;
    color: #d64d7e;
    margin-top: 20px;
    opacity: 0;
    animation: fadeIn 1s 3.5s forwards, pulse 2s infinite 4.5s;
}

/* 按钮容器 */
.button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

button {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

#yes-btn {
    background-color: #ff4d8d;
    color: white;
}

#yes-btn:hover {
    background-color: #e6005c;
    transform: scale(1.05);
}

#no-btn {
    background-color: #b8b8b8;
    color: white;
}

#no-btn:hover {
    background-color: #999;
    transform: scale(1.05);
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 20px 0;
    color: #888;
    font-size: 0.9rem;
}

/* 飘落的心形 */
.floating-heart {
    position: absolute;
    font-size: 1.5rem;
    color: #ff9ec0;
    opacity: 0.7;
    z-index: 0;
    user-select: none;
    pointer-events: none;
}

/* 动画定义 */
@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .heart {
        font-size: 3rem;
    }
    
    .message {
        font-size: 1rem;
    }
    
    .confession {
        font-size: 1.5rem;
    }
    
    .button-container {
        flex-direction: column;
        align-items: center;
    }
    
    button {
        width: 80%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    main {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
}